package com.ssyt.ssh.sys.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.ssyt.ssh.common.BaseDao;
import com.ssyt.ssh.sys.dao.CategoryDao;
import com.ssyt.ssh.sys.entity.Category;

@Repository
public class CategoryDaoImpl extends BaseDao<Category, Integer> implements CategoryDao {

	@Override
	public List<Category> listCate(Integer userid) {
		String str = "SELECT * FROM category where user_id=? ORDER BY id ASC";
		return listEntityBySql(str, userid);
	}

	@Override
	public List<Category> listAllCate() {
		String str = "SELECT * FROM category";
		return listEntityBySql(str);
	}
	
}
